import { restApi } from "@/api/http";
// let pro = "/proxy"; // process.env.VUE_APP_API_BASE_URL + "/proxy";
let pro = ""; //process.env.VUE_APP_API_BASE_URL;
export default {
  // ai
  //会话保存
  addChatHistory(data) {
    return restApi(
      {
        url: `${pro}/employment-server/api/v1/ai/addChatHistory`,
        method: "post",
        data,
      },
      { loading: false }
    );
  },
  // ai历史记录
  queryAiRecords(data) {
    return restApi({
      url: `${pro}/employment-server/api/v1/ai/records`,
      method: "get",
      params: data,
    });
  },

  // 删除会话
  delChatHistory(id) {
    return restApi({
      url: `${pro}/employment-server/api/v1/ai/delChatHistory/${id}`,
      method: "delete",
    });
  },
  // 查询聊天记录详情
  queryAiDetail(data) {
    return restApi({
      url: `${pro}/employment-server/api/v1/ai/getById`,
      method: "get",
      params: data,
    });
  },
  askingQuestions2(data) {
    return restApi(
      {
        url: `${pro}/api/v1/ai/askingQuestions2`,
        method: "post",
        data,
      },
      { loading: false }
    );
  },
};
